#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/fcntl.h>
#include <unistd.h>
#include <string.h>
#include <math.h>

#define tupleNum	(5000*500 * 8)

int main(int argc, char ** argv){
	FILE * agg; 
	int i,j;
	int key,value;


	agg = fopen("./AGG","w");
	int distinct = 200000;

	char buf[128]= {0};
	memset(buf,0,sizeof(buf));

	int *xx = (int *)malloc(sizeof(int)*distinct);
	for(i=0;i<distinct;i++){
		srandom(i*11+101);
		xx[i] = random() %(1024*1024*10);
	}

// write out the key

	for(i=0; i<tupleNum ; i++){
		srandom(i*13+101);
		int pos = random() %distinct ;
		int key = xx[pos]; 
		printf("%d|%d\n",key,i%100);
	}


	return 0;
}
